package com.shuyun.spring4.showcase.conditional;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created by feng.ding on 2017/1/4.
 */
public class ConditionMain {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConditionConfig.class);
        ListService listService = context.getBean(ListService.class);
        System.out.println(context.getEnvironment().getProperty("os.name") + " 系統下的列表命令是：" + listService.showListCmd());
        context.close();
    }
}
